package com.luoqiz.designPatterns.factory.simpleFactory;

import com.luoqiz.designPatterns.util.XMLUtil;

public class Main {

	public static void main(String[] args) {
		String operation = XMLUtil.getSimpleFactoryOperationType();
		int n1 = 50;
		int n2 = 60;
		//根据操作符获取实际的实例
		Operation opera = OperationFaction.createOperation(operation);
		opera.setN1(n1);
		opera.setN2(n2);
		double result = opera.getResult();
		System.out.println(result);
	}

}
